#!/bin/bash
# build-and-push.sh

DOCKER_USERNAME="ajunfornet"
VERSION="latest"

echo "构建镜像..."
# docker build -t $DOCKER_USERNAME/metatool-web:$VERSION .
docker build -t $DOCKER_USERNAME/metatool-remote-hosting:$VERSION ./remote-hosting
docker build --target migrator -t $DOCKER_USERNAME/metatool-migrate:$VERSION .

echo "推送镜像到 Docker Hub..."
docker push $DOCKER_USERNAME/metatool-web:$VERSION
docker push $DOCKER_USERNAME/metatool-remote-hosting:$VERSION
docker push $DOCKER_USERNAME/metatool-migrate:$VERSION

echo "完成！"